<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/themes/icon.css">
<LINK href="${pageContext.request.contextPath}/css/admin.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
   $('#list_table tr:odd').addClass('odd');
   $('#list_table tr:even').addClass('even');
   $('#list_table tr').hover(function() {
     $(this).addClass("hover");
   },function(){
     $(this).removeClass("hover");
   }); 
});

</script>
</HEAD>
<BODY>
<form action="${pageContext.request.contextPath }/servlet/AdminServlet?method=save" method="post" >
<!--导航部分-->
<div id="u_daohang"><span class="textc1">当前位置：</span><span class="textc2">系统管理</span>&nbsp;&gt;&nbsp;普通用户管理</div>
<!--导航部分-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="pub_table2" style="margin-top:10px; table-layout:fixed;">
</table>
<c:if test="${user[0]== null}">
  	sorry···· 暂时没有数据，请录入数据！
</c:if>
<c:if test="${user[0]!=null}">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="pub_table" id="list_table" style="margin-top:5px; table-layout:fixed;">
  <tr>
    <th width="180">登录用户名</th>
    <th width="80">姓名</th>
    <th width="90">年龄</th>
    <th width="90">邮箱</th>
    <th width="90">电话</th>
    <th width="90">性别</th>
    <th width="90">邮编</th>
    <th width="90">地址</th>
    <th width="90">操作</th>
  </tr>
  
  <c:forEach var="u" items="${user}">
  <tr>
    <td align="center">${u.username }</td>
    <td align="center">${u.name }</td>
    <td align="center">${u.age }</td>
    <td align="center">${u.mail }</td>
    <td align="center">${u.tel }</td>
    <td align="center">${u.sex==0 ? '男':'女' }</td>
    <td align="center">${u.zip }</td>
    <td align="center">${u.address }</td>
    <td align="center">
    	<a href="${pageContext.request.contextPath }/servlet/HtEditUserPage?id=${u.id}">编辑</a>&nbsp;|&nbsp;
    	<a href="${pageContext.request.contextPath }/servlet/HtUserServlet?method=delete&id=${u.id}">删除</a>
    	 |&nbsp;
    	<c:if test="${u.islock == 1}">
    	<a href="${pageContext.request.contextPath }/servlet/HtUserServlet?method=lock&id=${u.id}">解锁
    	</c:if>
    	<c:if test="${u.islock == 0}">
    	<a href="${pageContext.request.contextPath }/servlet/HtUserServlet?method=unlock&id=${u.id}">锁定
    	</c:if>
    </td>
  </tr>
  </c:forEach>
</table>
</c:if>
</form>
</BODY>
</HTML>